function Popup2(elm, opts) {
  this._elm = elm;
  this._opts = opts;
  this._pane = null;
  
  this._createElements();
}

Popup2.prototype._createElements = function() {
  var _self = this;
  
  this._pane = document.createElement('div');
  this._pane.style.backgroundRepeat = 'repeat';
  this._pane.style.position = 'absolute';
  this._pane.style.display = 'block';
  this._pane.style.top = (this._opts && this._opts.pos) ? this._opts.pos[1] + 'px' : '0px';
  this._pane.style.left = (this._opts && this._opts.pos) ? this._opts.pos[0] + 'px' : '0px';
  document.body.appendChild(this._pane);

  this._pane.appendChild(this._elm);
};

Popup2.prototype._close = function() {
  if (this._pane) {
    document.body.removeChild(this._pane);
    this._pane = null;
  }
}
